package com.gitee.xqxyxchy.crypto;

public enum ParamKey {

	PUBLIC_KEY("publicKey", "公钥"), 
	PRIVATE_KEY("privateKey", "私钥"), 
	IV_KEY("ivKey", "向量"), 
	ALGORITHMS("algorithms", "算法"), 
	KEY_SIZE("keySize", "密钥长度"), 
	HEX_KEY("hexKey", "16进制密钥");

    private String key;
    private String text;

    private ParamKey(String key) {
        this.key = key;
        this.text = key;
    }

    private ParamKey(String key, String text) {
        this.key = key;
        this.text = text;
    }

    public static ParamKey get(String key) {
        for (ParamKey p : ParamKey.values()) {
            if (key == p.getKey()) {
                return p;
            }
        }

        return null;
    }

    public String getKey() {
        return key;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

}
